package com.lagou.order.controller;

import com.lagou.common.pojo.GoodsVo;
import com.lagou.common.pojo.Orders;
import com.lagou.common.pojo.OrdersVo;
import com.lagou.order.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;
    @GetMapping("/query/{id}")
    public Orders queryById(@PathVariable Integer id){
        return ordersService.queryById(id);

    }


    @GetMapping("/queryList")
    public OrdersVo queryList(Integer current, Integer size){
        System.out.println(current);
        System.out.println(size);
        return ordersService.queryList(current,size);


    }
}
